package com.longxi.tianjintianbao.ui.dialog_fragment;

import android.support.v7.widget.RecyclerView;
import android.widget.EditText;
import android.widget.TextView;

import com.longxi.tianjintianbao.R;
import com.longxi.tianjintianbao.ui.activity.rectification.RectificationDetailActivity;
import com.longxi.tianjintianbao.ui.base.BaseDialogFragment;
import com.longxi.tianjintianbao.ui.presenter.rectification.RectificationStateDfgPresenter;
import com.longxi.tianjintianbao.ui.view.rectification.IRectificationStateDfgView;

import butterknife.BindView;

public class RectificationStateDialogFragment extends BaseDialogFragment<IRectificationStateDfgView, RectificationStateDfgPresenter> implements IRectificationStateDfgView {

    @BindView(R.id.etFinishremark)
    EditText mEtFinishremark;
    @BindView(R.id.btnLogin)
    TextView mBtnLogin;

    @Override
    public void initData() {
        super.initData();
        mPresenter.setBar();
    }

    @Override
    public void initListener() {
        super.initListener();
        mBtnLogin.setOnClickListener(v -> mPresenter.getRectificationDetailActivity().saveRectificationState(mEtFinishremark.getText().toString().trim()));
    }

    @Override
    protected int provideContentViewId() {
        return R.layout.dialog_fragment_rectification_state;
    }

    @Override
    protected RectificationStateDfgPresenter createPresenter() {
        return new RectificationStateDfgPresenter((RectificationDetailActivity)getActivity(), this);
    }

    @Override
    public EditText getEtFinishremark() {
        return mEtFinishremark;
    }
}
